package com.healthy.reminders.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.reminders.mapper.PlanDetailsMapper;
import com.healthy.reminders.domain.PlanDetails;
import com.healthy.reminders.service.IPlanDetailsService;

/**
 * 计划详情Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class PlanDetailsServiceImpl implements IPlanDetailsService 
{
    @Autowired
    private PlanDetailsMapper planDetailsMapper;

    /**
     * 查询计划详情
     * 
     * @param id 计划详情主键
     * @return 计划详情
     */
    @Override
    public PlanDetails selectPlanDetailsById(Long id)
    {
        return planDetailsMapper.selectPlanDetailsById(id);
    }

    /**
     * 查询计划详情列表
     * 
     * @param planDetails 计划详情
     * @return 计划详情
     */
    @Override
    public List<PlanDetails> selectPlanDetailsList(PlanDetails planDetails)
    {
        return planDetailsMapper.selectPlanDetailsList(planDetails);
    }

    /**
     * 新增计划详情
     * 
     * @param planDetails 计划详情
     * @return 结果
     */
    @Override
    public int insertPlanDetails(PlanDetails planDetails)
    {
        return planDetailsMapper.insertPlanDetails(planDetails);
    }

    /**
     * 修改计划详情
     * 
     * @param planDetails 计划详情
     * @return 结果
     */
    @Override
    public int updatePlanDetails(PlanDetails planDetails)
    {
        return planDetailsMapper.updatePlanDetails(planDetails);
    }

    /**
     * 批量删除计划详情
     * 
     * @param ids 需要删除的计划详情主键
     * @return 结果
     */
    @Override
    public int deletePlanDetailsByIds(Long[] ids)
    {
        return planDetailsMapper.deletePlanDetailsByIds(ids);
    }

    /**
     * 删除计划详情信息
     * 
     * @param id 计划详情主键
     * @return 结果
     */
    @Override
    public int deletePlanDetailsById(Long id)
    {
        return planDetailsMapper.deletePlanDetailsById(id);
    }
}
